﻿using System.Globalization;
using System.IO;

namespace SunnyUI.Localization.Demo
{
    public static class Global
    {
        public static CultureInfo CultureInfo = CultureInfos.SimplifiedChinese;

        /// <summary>
        /// 调用系统资源管理器打开文件夹，如果是文件则选中文件
        /// </summary>
        /// <param name="dir">文件夹</param>
        public static void OpenDir(string dir)
        {
            if (File.Exists(dir))
            {
                System.Diagnostics.Process.Start("Explorer.exe", @"/select," + dir);
            }

            if (Directory.Exists(dir))
            {
                System.Diagnostics.Process.Start("Explorer.exe", dir);
            }
        }
    }
}
